<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Std.html">
<link rel="next" href="UTF8.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Base64" rel="Chapter" href="Base64.html">
<link title="BitSet" rel="Chapter" href="BitSet.html">
<link title="Dllist" rel="Chapter" href="Dllist.html">
<link title="DynArray" rel="Chapter" href="DynArray.html">
<link title="Enum" rel="Chapter" href="Enum.html">
<link title="ExtArray" rel="Chapter" href="ExtArray.html">
<link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html">
<link title="ExtLib" rel="Chapter" href="ExtLib.html">
<link title="ExtList" rel="Chapter" href="ExtList.html">
<link title="ExtString" rel="Chapter" href="ExtString.html">
<link title="Global" rel="Chapter" href="Global.html">
<link title="IO" rel="Chapter" href="IO.html">
<link title="OptParse" rel="Chapter" href="OptParse.html">
<link title="Option" rel="Chapter" href="Option.html">
<link title="PMap" rel="Chapter" href="PMap.html">
<link title="RefList" rel="Chapter" href="RefList.html">
<link title="Std" rel="Chapter" href="Std.html">
<link title="UChar" rel="Chapter" href="UChar.html">
<link title="UTF8" rel="Chapter" href="UTF8.html">
<link title="Unzip" rel="Chapter" href="Unzip.html"><title>UChar</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Std.html" title="Std">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="UTF8.html" title="UTF8">Next</a>
</div>
<h1>Module <a href="type_UChar.html">UChar</a></h1>
<pre><span class="keyword">module</span> UChar: <code class="code">sig</code> <a href="UChar.html">..</a> <code class="code">end</code></pre><div class="info">
Unicode (ISO-UCS) characters.
<p>

   This module implements Unicode (actually ISO-UCS) characters.  All
   31-bit code points are allowed.<br>
</div>
<hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info">
Unicode characters. All 31-bit code points are allowed.<br>
</div>

<pre><span id="EXCEPTIONOut_of_range"><span class="keyword">exception</span> Out_of_range</span></pre>
<pre><span id="VALchar_of"><span class="keyword">val</span> char_of</span> : <code class="type"><a href="UChar.html#TYPEt">t</a> -> char</code></pre><div class="info">
<code class="code">char_of u</code> returns the Latin-1 representation of <code class="code">u</code>.
   If <code class="code">u</code> can not be represented by Latin-1, raises Out_of_range<br>
</div>
<pre><span id="VALof_char"><span class="keyword">val</span> of_char</span> : <code class="type">char -> <a href="UChar.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">of_char c</code> returns the Unicode character of the Latin-1 character <code class="code">c</code><br>
</div>
<pre><span id="VALcode"><span class="keyword">val</span> code</span> : <code class="type"><a href="UChar.html#TYPEt">t</a> -> int</code></pre><div class="info">
<code class="code">code u</code> returns the Unicode code number of <code class="code">u</code>.
   If the value can not be represented by a positive integer,
   raise Out_of_range<br>
</div>
<pre><span id="VALchr"><span class="keyword">val</span> chr</span> : <code class="type">int -> <a href="UChar.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">code n</code> returns the Unicode character with the code number <code class="code">n</code>. 
   If n &gt;= 2^32 or n &lt; 0, raises <code class="code">invalid_arg</code><br>
</div>
<pre><span id="VALuint_code"><span class="keyword">val</span> uint_code</span> : <code class="type"><a href="UChar.html#TYPEt">t</a> -> int</code></pre><div class="info">
<code class="code">uint_code u</code> returns the Unicode code number of <code class="code">u</code>.
   The returned int is unsigned, that is, on 32-bit platforms,
   the sign bit is used for storing the 31-th bit of the code number.<br>
</div>
<pre><span id="VALchr_of_uint"><span class="keyword">val</span> chr_of_uint</span> : <code class="type">int -> <a href="UChar.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">chr_of_uint n</code> returns the Unicode character of the code number <code class="code">n</code>.
   <code class="code">n</code> is interpreted as unsigned, that is, on 32-bit platforms,
   the sign bit is treated as the 31-th bit of the code number.
   If n exceeds 31-bit values, then raise <code class="code">Invalid_arg</code>.<br>
</div>
<pre><span id="VALunsafe_chr_of_uint"><span class="keyword">val</span> unsafe_chr_of_uint</span> : <code class="type">int -> <a href="UChar.html#TYPEt">t</a></code></pre><div class="info">
Unsafe version of <a href="UChar.html#VALchr_of_uint"><code class="code">UChar.chr_of_uint</code></a>.
   No check of its argument is performed.<br>
</div>
<pre><span id="VALeq"><span class="keyword">val</span> eq</span> : <code class="type"><a href="UChar.html#TYPEt">t</a> -> <a href="UChar.html#TYPEt">t</a> -> bool</code></pre><div class="info">
Equality by code point comparison<br>
</div>
<pre><span id="VALcompare"><span class="keyword">val</span> compare</span> : <code class="type"><a href="UChar.html#TYPEt">t</a> -> <a href="UChar.html#TYPEt">t</a> -> int</code></pre><div class="info">
<code class="code">compare u1 u2</code> returns, 
   a value &gt; 0 if <code class="code">u1</code> has a larger Unicode code number than <code class="code">u2</code>, 
   0 if <code class="code">u1</code> and <code class="code">u2</code> are the same Unicode character,
   a value &lt; 0 if <code class="code">u1</code> has a smaller Unicode code number than <code class="code">u2</code>.<br>
</div>
<pre><span id="TYPEuchar"><span class="keyword">type</span> <code class="type"></code>uchar</span> = <code class="type"><a href="UChar.html#TYPEt">t</a></code> </pre>
<div class="info">
Aliases of <code class="code">type t</code><br>
</div>

<pre><span id="VALint_of_uchar"><span class="keyword">val</span> int_of_uchar</span> : <code class="type"><a href="UChar.html#TYPEuchar">uchar</a> -> int</code></pre><div class="info">
Alias of <code class="code">uint_code</code><br>
</div>
<pre><span id="VALuchar_of_int"><span class="keyword">val</span> uchar_of_int</span> : <code class="type">int -> <a href="UChar.html#TYPEuchar">uchar</a></code></pre><div class="info">
Alias of <code class="code">chr_of_uint</code><br>
</div>
</body></html>